package ualrcdg.shared.dto;

import java.util.Arrays;

/**
 * Simple implementation of the "updateSet" object. See CDG XML Specifications: Game Descriptor Files.
 */
public class PropertyUpdateSet
{
	final private String id;
	final private String[] updateIds;
	
	/**
	 * Primary constructor
	 *
	 * @param id the id of the PropertyUpdateSet object to be created
	 * @param updateIds the updateIds of the PropertyUpdateSet object to be created
	 */
	public PropertyUpdateSet( String id, String[ ] updateIds )
	{
		this.id = id;
		this.updateIds = Arrays.copyOf( updateIds, updateIds.length );
		
		System.out.println( "Parsed: " + this.toString( ) );
	}

	/*
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString( )
	{
		return "PropertyUpdateSet [id=" + id + ", updateIds=" + Arrays.toString( updateIds ) + "]";
	}

	/**
	 * @return the id of this PropertyUpdateSet instance
	 */
	public String getId( )
	{
		return id;
	}

	/**
	 * @return the updateIds of this PropertyUpdateSet instance
	 */
	public String getUpdateIds( int index )
	{
		return updateIds[index];
	}
}
